//
//  ViewController.swift
//  CALayerDemo
//
//  Created by HJQ on 2018/7/14.
//  Copyright © 2018年 HJQ. All rights reserved.
//

import UIKit

class ViewController: UIViewController {

    let layerOne = BFSeaLevelProgressLayer()

    override func viewDidLoad() {
        super.viewDidLoad()

        view.layer.addSublayer(layerOne)
        layerOne.number = 0.0

    }

    override func viewWillLayoutSubviews() {
        super.viewWillLayoutSubviews()

        layerOne.frame = CGRect.init(x: 50, y: 100, width: 100, height: 100)
    }

    // MARK: - Event response
    @IBAction func sliderAction(_ sender: UISlider) {
        layerOne.number = Double(sender.value)
    }

}

